<?php

namespace App\Http\Controllers\Cruise\FeishuMini;

use App\Http\Controllers\BaseController;
use App\Service\Cruise\Check\CruiseCheckTaskService;
use Illuminate\Http\Request;

class CheckTaskController extends BaseController
{
    public function cancelOrder(Request $request, int $id)
    {
        $userId = getRmsUserId();
        $invalidType = (int)$request->post('invalidType', 0);
        $video       = $request->post('video', []);
        $explain     = (string)$request->post('explain', '');
        CruiseCheckTaskService::orderCancel($id, $userId, true, $invalidType, $explain, $video);

        return $this->success();
    }
}
